import request from '@/utils/request'

// 售货机类型列表(搜索)
export const searchTypeTable = (obj) => {
  return request.get('/api/vm-service/vmType/search', {
    params: obj
  })
}

// 图片上传
export const updateImg = (data) => {
  return request.post('/api/vm-service/sku/fileUpload', data, {
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}

// 新增售货机类型
export const addSaleType = (data) => {
  return request.post('/api/vm-service/vmType', data)
}

// 售货机类型删除
export const delSaleType = (typeId) => {
  return request.delete(`/api/vm-service/vmType/${typeId}`)
}

// 售货机类型修改
export const updateSaleType = (form) => {
  return request.put(`/api/vm-service/vmType/${form.typeId}`, form)
}

// 售货机类型详情
export const SaleTypeDetail = (typeId) => {
  return request.get(`/api/vm-service/vmType/${typeId}`)
}
